package com.cike.sparkstudy.sql.scala

import org.apache.spark.sql.SQLContext
import org.apache.spark.{SparkConf, SparkContext}

object ManuallySpecifyOptions {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local").setAppName("GenericLoadSave")
    val sc = new SparkContext(conf)
    val sqlContext = new SQLContext(sc)

    val peopleDF = sqlContext.read.format("json").load("/developerCodes/test/people.json")

    peopleDF.select("name").write.format("parquet").save("/developerCodes/test/peopleName_scala")

  }

}
